Q: We're working on drivers for the ATA bus
in Power Macintosh computers. However, we can't seem to find the link
libraries on our ETO disks. The header libraries are there, but there
is nothing to link to.
A: Classic 68K code calls ATA Manager through
inline trap glue and does not need a link library. CFM (PowerPC and
CFM-68K) code needs to used Mixed Mode glue to call the
ataManager trap. The following code should do:
#include <MixedMode.h>#include <Patches.h>#include <ATA.h> extern pascal SInt16 ataManager(ataPB *pb)
{
return CallUniversalProc(
GetToolboxTrapAddress(0xAAF1),
kPascalStackBased
| RESULT_SIZE(SIZE_CODE(sizeof(SInt16)))
| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(pb))),
pb);
}
|
|